@extends('layouts.homebase')
@section('tdk')
<title>{{$tdk['title']}}</title>
<meta name="keywords" content="{{$tdk['keywords']}}" />
<meta name="description" content="{{$tdk['description']}}" />
@endsection
@section('css')
@parent
<link rel="stylesheet" type="text/css" href="">
@endsection
@section('content')

<main>
  <div class="lbox">
    <div class="weizhi">您现在的位置是：<a href="{{request()->schemeAndHttpHost()}}" class="classlinkclass">首页</a> > 
	<a href="/files/" class="classlinkclass">文件下载</a> @if($keyboard) > {{ $files['title'] }} @endif
	</div>
	@if(!$keyboard)
	<div class="pics">
		<ul>
		@foreach($files as $t)
		<li style="width:30%;"><a href="/file/{{$t['file_id']}}.html" target="_blank" style="height:60px;overflow:hidden;"> {{$t['title']}} </a></li>
	    @endforeach
		</ul>
    </div>
	<style>.flex{text-align: center !important;}</style>
	{{ $files->links() }}
	@else
	<div class="newsbox">
		<section style="width:100%;">
			<div class="news">  
				<a href="/file/{{ $files['file_id'] }}.html" target="_blank">
					<h2 class="newstitle">{{ $files['title'] }}</h2>
					<i style="height:333px;"><img src="https://cdn3.photostockeditor.com/t/A2305/-feather-on-white-book-page---image.jpg" style="width:auto;"></i>
				</a>  
				<ul>
					<li><a href="/file/{{ $files['file_id'] }}.html" title="{{ $files['title'] }}" target="_blank">ID：{{ $files['file_id'] }}</a></li>
					<li><a href="/file/{{ $files['file_id'] }}.html" title="上传作者" target="_blank">作者：{{ $files['user']['name'] }}</a></li>
					<li><a href="/file/{{ $files['file_id'] }}.html" title="上传时间" target="_blank">上传时间：{{ $files['created_at'] }}</a></li>
					<li><a href="/file/{{ $files['file_id'] }}.html" title="下载量" target="_blank">下载量：{{ $files['num'] }}</a></li>
					<li><a href="/file/{{ $files['file_id'] }}.html" title="标题" target="_blank">标题：{{ $files['title'] }}</a></li>
					<li>描述：<p title="描述" style="height:130px;overflow:auto;white-space:normal;">{!! $files['miaosu'] !!}</p></li>
					<li>
					@if (substr($files['path'],0,4) == 'http')
					<a href="{{ $files['path'] }}" target="_blank" rel="nofollow" style="padding: .78571429em 1.5em;border: none;background: #16499d;color: #fff;">点击下载</a>
					@else
					<a href="{{ $files['path'] }}" target="_blank" rel="nofollow" download="{{ $files['title'] }}.<?php $a=explode('.', $files['path']); echo end($a) ?>" style="padding: .78571429em 1.5em;border: none;background: #16499d;color: #fff;">点击下载</a>
					@endif     
					</li>
				</ul>
			</div>
		</section>
	</div>
	@endif		
  </div>
  <aside class="rbox">
    <div class="ad">
		<a href="/" target="_blank">
		<img src="" alt="广告位">
		</a>
	</div>
    <div class="hot_news">
      <p class="h_title">文章热榜</p>
      <ul>
	  	@foreach($hotarts as $art)
		<li><a href="/detail/{{$art['art_id']}}.html" title="{{$art['title']}}" target="_blank">{{$art['title']}}</a></li>
		@endforeach	
	</ul>
    </div>
  </aside>
</main>

@endsection
@section('js')
@parent
<script></script> 
@endsection







